/*
 *
 *      Copyright (c) 2018-2025, waterx All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: waterx
 *
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import com.example.tenant.Converter.LongStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.FieldNameConstants;

import java.util.Date;

/**
 * <p>
 * 菜单权限表
 * </p>
 *
 * @author waterx
 * @since 2017-11-08
 */
@Data
@ColumnWidth(10)
@FieldNameConstants
@EqualsAndHashCode(callSuper = true)
public class SysMenu extends Model<SysMenu> {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID
     */
    @TableId(value = "menu_id", type = IdType.ASSIGN_ID)
    @ExcelProperty("menu_id")
    private String menuId;

    /**
     * 菜单名称
     */
    @ExcelProperty("name")
    private String name;

    /**
     * 菜单权限标识
     */
    @ExcelProperty("permission")
    private String permission;

    /**
     * 父菜单ID
     */
    @ExcelProperty("parent_id")
    private String parentId;

    /**
     * 图标
     */
    @ExcelProperty("icon")
    private String icon;

    /**
     * 前端路由标识路径，默认和 comment 保持一致 过期
     */
    @ExcelProperty("path")
    private String path;

    /**
     * 菜单显示隐藏控制
     */
    @ExcelProperty("visible")
    private String visible;

    /**
     * 排序值
     */
    @ExcelProperty("sort_order")
    private Integer sortOrder;

    /**
     * 菜单类型 （0菜单 1按钮）
     */
    @ExcelProperty("menu_type")
    private String menuType;

    /**
     * 路由缓冲
     */
    @ExcelProperty("keep_alive")
    private String keepAlive;

    @ExcelProperty("embedded")
    private String embedded;

    @ExcelProperty("client_id")
    private String clientId;

    /**
     * 菜单编码
     */
    @ExcelProperty("menu_code")
    private String menuCode;

    /**
     * 菜单链接
     */
    @ExcelProperty("menu_url")
    private String menuUrl;

    /**
     * 按钮类型
     */
    @ExcelProperty("button_type")
    private String buttonType;

    /**
     * 参数配置
     */
    @ExcelProperty("menu_para")
    private String menuPara;

    /**
     * 层级编码
     */
    @ExcelProperty("level_code")
    private String levelCode;

    /**
     * 日志级别
     */
    @ExcelProperty("log_level")
    private String logLevel;

    /**
     * 访问该功能方式，rewrite,redirect
     */
    @ExcelProperty("access_type")
    private String accessType;

    /**
     * 帮助链接
     */
    @ExcelProperty("help_url")
    private String helpUrl;

    /**
     * 是否ca验证，说明当用户操作该功能时，是否需要进行CA验证
     */
    @ExcelProperty("is_ca")
    private String isCa;

    /**
     * 备注
     */
    @ExcelProperty("remark")
    private String remark;

    /**
     * 数据标签
     */
    @ExcelProperty("data_flag")
    private String dataFlag;

    /**
     * 是否子应用
     */
    @ExcelProperty("micro")
    private String micro;

    /**
     * 创建人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("create_time")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("update_time")
    private Date updateTime;

    /**
     * 删除标记
     */

    @TableField(fill = FieldFill.INSERT)
    @ExcelProperty("del_flag")
    private String delFlag;

    /**
     * 租户id
     */
    @ExcelProperty(value = "tenant_id", converter = LongStringConverter.class)
    private Long tenantId;

}
